;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
;;;
;;; This file is NOT part of GNU Guix.
;;;
;;; This file is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; This file is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with This file.  If not, see <http://www.gnu.org/licenses/>.

(define-module (staging cquery)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix packages)
  #:use-module (guix git-download)
  #:use-module (gnu packages llvm)
  #:use-module (guix build-system cmake))

(define-public cquery
  (let* ((commit "70c755b2e390d3edfb594a84a7531beb26b2bc07")
	 (revision "2")
	 (version (git-version "2018.07.18" revision commit)))
    (package
     (name "cquery")
     (version version)
     (home-page "https://github.com/cquery-project/cquery")
     (source (origin
	      (method git-fetch)
	      (uri (git-reference
                    (url home-page)
                    (commit commit)
		    (recursive? #t)))
	      (sha256
               (base32
		"15hndagk8szyxd34fp3z753i4vqb37p2b835a1k7pjff0hgdmg75"))
	      (file-name (git-file-name name version))))
     (build-system cmake-build-system)
     (arguments
      `(#:configure-flags
	'("-DSYSTEM_CLANG=ON")
	#:tests? #f))
     (inputs
      `(("clang" ,clang)))
     (synopsis "C/C++ language server supporting multi-million line code base,
powered by libclang.")
     (description "cquery is a highly-scalable, low-latency language server for
C/C++/Objective-C. It is tested and designed for large code bases like
Chromium. cquery provides accurate and fast semantic analysis without
interrupting workflow.")
     (license license:expat))))

cquery
